package com.dhcc.bpm.modules.metadata.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;

/**
 * 原服务接口定义数据表实体类
 *
 * @author ccab
 * @since 2020-06-03
 */
@Data
@TableName("opc_server_api_metadata")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ServerApiMetadata对象", description = "接口定义数据表")
public class ServerApiMetadata extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 名称
	*/
	@ApiModelProperty(value = "名称")
	private String name;
	/**
	* 是否必填
	*/
	@ApiModelProperty(value = "是否必填")
	private String isRequired;
	/**
	* 请求参数类型
	*/
	@ApiModelProperty(value = "请求参数类型")
	private String inType; // path \ query
	/**
	* 类型
	*/
	@ApiModelProperty(value = "类型")
	private String type;
	/**
	* 类型格式
	*/
	@ApiModelProperty(value = "类型格式")
	private String typeFormat;
	/**
	* 默认值
	*/
	@ApiModelProperty(value = "默认值")
	private String defaultValue;
	/**
	* 枚举
	*/
	@ApiModelProperty(value = "枚举")
	private String fileEnum;
	/**
	* xml名称
	*/
	@ApiModelProperty(value = "xml名称")
	private String xmlName;
	/**
	* 父id
	*/
	@JsonSerialize(
			using = ToStringSerializer.class,
			nullsUsing = NullSerializer.class
	)
	@ApiModelProperty(value = "父id")
	private Long groupId;
	/**
	* 父名称
	*/
	@ApiModelProperty(value = "父名称")
	private String ref;

	private String xmlWrapped;
	/**
	* 描述
	*/
	@ApiModelProperty(value = "描述")
	private String description;
	/**
	* 接口id
	*/
	@JsonSerialize(
			using = ToStringSerializer.class,
			nullsUsing = NullSerializer.class
	)
	@ApiModelProperty(value = "api接口id")
	private Long apiId;
	/**
	* body类型
	*/
	@JsonSerialize(
			using = ToStringSerializer.class,
			nullsUsing = NullSerializer.class
	)
	@ApiModelProperty(value = "body类型")
	private Integer bodyType; //1 请求参数  2 响应参数

	/**
	 * 接口id
	 */
	 @JsonSerialize(
			using = ToStringSerializer.class,
			nullsUsing = NullSerializer.class
	)
	@ApiModelProperty(value = "api接口id")
	private Long metadataId;

}
